package server;

import java.net.InetAddress;

/**
 * create by tanxh on 2020-05-09
 **/

public class Connector {

    private String port;

    public Connector(String port) {
        this.port = port;
    }

    public String getPort() {
        return port;
    }

    public void setPort(String port) {
        this.port = port;
    }

    public static void main(String[] args) {
        try {
            InetAddress add = InetAddress.getLocalHost();
            System.out.println(add.getHostAddress());
            System.out.println(add.getAddress());
            System.out.println(add.getCanonicalHostName());
            System.out.println(add.getHostName());
            System.out.println(InetAddress.getByName("localhost").getHostName());




        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
